﻿using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.Text;

namespace MongoDB.Model
{
    public class Mongo_TaskAuth
    {
        /// <summary>
        /// Id
        /// </summary>
        [BsonId]
        public ObjectId ID { get; set; }

        /// <summary>
        /// 唯一主键
        /// </summary>
        public string AuthGuid { get; set; }

        /// <summary>
        /// 验证方式名称
        /// </summary>
        public string AuthName { get; set; }

        /// <summary>
        /// 任务所需要调用的Url
        /// </summary>
        public string AuthUrl { get; set; }

        /// <summary>
        /// 调用方式
        /// </summary>
        public string Method { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 用户名所对应的字段名称
        /// </summary>
        public string UserNameField { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string Psw { get; set; }

        /// <summary>
        /// 密码所对应的字段名
        /// </summary>
        public string PswField { get; set; }

        /// <summary>
        /// 验证头所在的字段,如果为多级的，则用:分开。比如在data里面的Token字段里，则填写 data:Token
        /// </summary>
        public string AuthTokenField { get; set; }

        /// <summary>
        /// 请求时，此Token对应的Header
        /// </summary>
        public string AuthTokenHeader { get; set; }

        /// <summary>
        /// 请求其他内容
        /// </summary>
        public string RequestBody { get; set; }

        /// <summary>
        /// 1:FromBody(json),2.FromForm
        /// </summary>
        public int BodyType { get; set; }

        /// <summary>
        /// 请求头
        /// </summary>
        public string Token { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

    }
}
